<!--
 * @Author: jlzm
 * @Date: 2020-06-18 14:41:32
 * @LastEditors: jlzm
 * @LastEditTime: 2020-07-01 10:24:00
 * @FilePath: \MPShop\pages\common\pages\noNetwork\noNetwork.vue
--> 
<template>
	<view class="container">
		<view class="no-network-wrap">
			<!-- <image
				src="/static/image/common/no_network.png"
				class="image"
			></image> -->
			<view class="desc">网络出现问题 刷新一下吧</view>
			<button @click="refresh()" class="df jc-c ai-c btn">刷新</button>
		</view>
	</view>
</template>

<script>
import { getHasNetwork } from "@/lib/storage";
export default {
	data() {
		return {
			checkoutNetwork: false
		};
	},

	methods: {
		refresh() {
			const hasNetwork = getHasNetwork();
			if (!hasNetwork) {
				this.$api.showToast("刷新失败，请检查您的网络* _ *");
				return;
			}
			uni.reLaunch({
				url: "/pages/tabbar/index"
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.no-network-wrap {
	margin-top: 246rpx;
	display: flex;
	align-items: center;
	flex-direction: column;
	.image {
		width: 248rpx;
		height: 276rpx;
	}

	.desc {
		margin-top: 60rpx;
		font-size: 32rpx;
		color: $theme-color-ghost-base;
	}

	.btn {
		margin-top: 72rpx;
		width: 172rpx;
		height: 72rpx;
		font-size: 32rpx;
		color: $theme-color-ghost-base;
		border: 2rpx solid #979797;
		border-radius: 40rpx;
	}
}
</style>